package pers.cj.pdos.mapper;

import org.apache.ibatis.annotations.Param;
import pers.cj.pdos.entity.Custom;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import pers.cj.pdos.entity.Goods;
import pers.cj.pdos.vo.CountVo;
import pers.cj.pdos.vo.CustomVo;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author chenj
 * @since 2019-11-04
 */
public interface CustomMapper extends BaseMapper<Custom> {
    List<CustomVo> listVoForInit(@Param("companyId") String companyId,
                                 @Param("page") Integer page,
                                 @Param("limit") Integer limit,
                                 @Param("search") String search);

    Long countForInit(@Param("companyId") String companyId,
                                 @Param("search") String search);

    List<CustomVo> listVo(@Param("companyId") String companyId,
                          @Param("page") Integer page,
                          @Param("limit") Integer limit,
                          @Param("status") Integer status,
                          @Param("search") String search,
                          @Param("customTypeId") String customTypeId,
                          @Param("no") String no,
                          @Param("name") String name,
                          @Param("unitTel") String unitTel,
                          @Param("phone") String phone,
                          @Param("contacts") String contacts,
                          @Param("remark") String remark,
                          @Param("storeId") String storeId,
                          @Param("userId") String userId);

    Long count(@Param("companyId") String companyId,
               @Param("status") Integer status,
               @Param("search") String search,
               @Param("customTypeId") String customTypeId,
               @Param("no") String no,
               @Param("name") String name,
               @Param("unitTel") String unitTel,
               @Param("phone") String phone,
               @Param("contacts") String contacts,
               @Param("remark") String remark,
               @Param("storeId") String storeId,
               @Param("userId") String userId);

    void batchChangeCustomType(@Param("customTypeId") String customTypeId, @Param("list") List<Custom> list);

    List<CountVo> checkList(@Param("list") List<Custom> list);

    void deleteBatch(@Param("list")List<Custom> list);

    void insertBatch(@Param("list") List<Custom> customList);

    List<CustomVo> listVoByIds(@Param("ids")List<String> ids);
}
